#ifndef TITLESET_H
#define TITLESET_H

#include "globals.h"

class Titleset {
private:
	Titleset();
	Titleset(const Titleset&);
	Titleset& operator=(const Titleset&);
protected:
	bool read_sprite();
	ifstream inputStream;
	string file;
	sf::Image image;
	typedef map<string,sf::Sprite> spmap;
	spmap titles;
	typedef spmap::iterator spmapit;
	//spmapit it;
	typedef vector<sf::Sprite> spvec;
	typedef spvec::iterator spvecit;
	typedef spvec::const_iterator spvecitc;
	typedef vector<spvec> splay;
	splay layers;
	splay layers_over;
	float ox;
	float oy;
	unsigned int mask;
	void draw_layer(unsigned int l) const;
public:
	Titleset(const char* cfile);
	Titleset(const string &sfile);
	virtual ~Titleset();
	bool init();
	void set_shift(float o_x,float o_y);
	sf::Vector2f get_shift() const;
	void draw() const;
	void show_layer(unsigned int l);
	void hide_layer(unsigned int l);
	void chg_layer(unsigned int l);
};

#endif
